diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index a30c822..daca08f 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1,13 +1,13 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * An open source application development framework for PHP 5.1.6 or newer
  *
  * NOTICE OF LICENSE
- *
+ * 
  * Licensed under the Open Software License version 3.0
- *
+ * 
  * This source file is subject to the Open Software License (OSL 3.0) that is
  * bundled with this package in the files license.txt / license.rst.  It is
  * also available through the world wide web at this URL:
@@ -42,44 +42,47 @@
  */
 class CI_DB_driver {
 
-	public $username;
-	public $password;
-	public $hostname;
-	public $database;
-	public $dbdriver		= 'mysql';
-	public $dbprefix		= '';
-	public $char_set		= 'utf8';
-	public $dbcollat		= 'utf8_general_ci';
-	public $autoinit		= TRUE; // Whether to automatically initialize the DB
-	public $swap_pre		= '';
-	public $port			= '';
-	public $pconnect		= FALSE;
-	public $conn_id			= FALSE;
-	public $result_id		= FALSE;
-	public $db_debug		= FALSE;
-	public $benchmark		= 0;
-	public $query_count		= 0;
-	public $bind_marker		= '?';
-	public $save_queries		= TRUE;
-	public $queries			= array();
-	public $query_times		= array();
-	public $data_cache		= array();
-	public $trans_enabled		= TRUE;
-	public $trans_strict		= TRUE;
-	protected $_trans_depth		= 0;
-	protected $_trans_status	= TRUE; // Used with transactions to determine if a rollback should occur
-	public $cache_on		= FALSE;
-	public $cachedir		= '';
-	public $cache_autodel		= FALSE;
-	public $CACHE; // The cache class object
+	var $username;
+	var $password;
+	var $hostname;
+	var $database;
+	var $dbdriver		= 'mysql';
+	var $dbprefix		= '';
+	var $char_set		= 'utf8';
+	var $dbcollat		= 'utf8_general_ci';
+	var $autoinit		= TRUE; // Whether to automatically initialize the DB
+	var $swap_pre		= '';
+	var $port			= '';
+	var $pconnect		= FALSE;
+	var $conn_id		= FALSE;
+	var $result_id		= FALSE;
+	var $db_debug		= FALSE;
+	var $benchmark		= 0;
+	var $query_count	= 0;
+	var $bind_marker	= '?';
+	var $save_queries	= TRUE;
+	var $queries		= array();
+	var $query_times	= array();
+	var $data_cache		= array();
+	var $trans_enabled	= TRUE;
+	var $trans_strict	= TRUE;
+	var $_trans_depth	= 0;
+	var $_trans_status	= TRUE; // Used with transactions to determine if a rollback should occur
+	var $cache_on		= FALSE;
+	var $cachedir		= '';
+	var $cache_autodel	= FALSE;
+	var $CACHE; // The cache class object
 
-	protected $_protect_identifiers	= TRUE;
-	protected $_reserved_identifiers	= array('*'); // Identifiers that should NOT be escaped
+	// Private variables
+	var $_protect_identifiers	= TRUE;
+	var $_reserved_identifiers	= array('*'); // Identifiers that should NOT be escaped
 
 	// These are use with Oracle
-	public $stmt_id;
-	public $curs_id;
-	public $limit_used;
+	var $stmt_id;
+	var $curs_id;
+	var $limit_used;
+
+
 
 	/**
 	 * Constructor.  Accepts one parameter containing the database
@@ -87,7 +90,7 @@
 	 *
 	 * @param array
 	 */
-	public function __construct($params)
+	function __construct($params)
 	{
 		if (is_array($params))
 		{
@@ -105,10 +108,11 @@
 	/**
 	 * Initialize Database Settings
 	 *
+	 * @access	private Called by the constructor
 	 * @param	mixed
-	 * @return	bool
+	 * @return	void
 	 */
-	public function initialize()
+	function initialize()
 	{
 		// If an existing connection resource is available
 		// there is no need to connect and select the database
@@ -196,11 +200,12 @@
 	/**
 	 * Set client character set
 	 *
+	 * @access	public
 	 * @param	string
 	 * @param	string
-	 * @return	bool
+	 * @return	resource
 	 */
-	public function db_set_charset($charset, $collation)
+	function db_set_charset($charset, $collation)
 	{
 		if ( ! $this->_db_set_charset($this->char_set, $this->dbcollat))
 		{
@@ -222,9 +227,10 @@
 	/**
 	 * The name of the platform in use (mysql, mssql, etc...)
 	 *
+	 * @access	public
 	 * @return	string
 	 */
-	public function platform()
+	function platform()
 	{
 		return $this->dbdriver;
 	}
@@ -235,9 +241,10 @@
 	 * Database Version Number.  Returns a string containing the
 	 * version of the database being used
 	 *
+	 * @access	public
 	 * @return	string
 	 */
-	public function version()
+	function version()
 	{
 		if (FALSE === ($sql = $this->_version()))
 		{
@@ -274,11 +281,12 @@
 	 * FALSE upon failure, and if the $db_debug variable is set to TRUE
 	 * will raise an error.
 	 *
+	 * @access	public
 	 * @param	string	An SQL query string
 	 * @param	array	An array of binding data
 	 * @return	mixed
 	 */
-	public function query($sql, $binds = FALSE, $return_object = TRUE)
+	function query($sql, $binds = FALSE, $return_object = TRUE)
 	{
 		if ($sql == '')
 		{
@@ -292,15 +300,15 @@
 		}
 
 		// Verify table prefix and replace if necessary
-		if (($this->dbprefix != '' && $this->swap_pre != '') && ($this->dbprefix != $this->swap_pre))
+		if ( ($this->dbprefix != '' AND $this->swap_pre != '') AND ($this->dbprefix != $this->swap_pre) )
 		{
-			$sql = preg_replace('/(\W)'.$this->swap_pre.'(\S+?)/', '\\1'.$this->dbprefix.'\\2', $sql);
+			$sql = preg_replace("/(\W)".$this->swap_pre."(\S+?)/", "\\1".$this->dbprefix."\\2", $sql);
 		}
 
 		// Is query caching enabled?  If the query is a "read type"
 		// we will load the caching class and return the previously
 		// cached query if it exists
-		if ($this->cache_on == TRUE && stristr($sql, 'SELECT'))
+		if ($this->cache_on == TRUE AND stristr($sql, 'SELECT'))
 		{
 			if ($this->_cache_init())
 			{
@@ -385,7 +393,7 @@
 		{
 			// If caching is enabled we'll auto-cleanup any
 			// existing files related to this particular URI
-			if ($this->cache_on == TRUE && $this->cache_autodel == TRUE && $this->_cache_init())
+			if ($this->cache_on == TRUE AND $this->cache_autodel == TRUE AND $this->_cache_init())
 			{
 				$this->CACHE->delete();
 			}
@@ -404,10 +412,10 @@
 		// Load and instantiate the result driver
 		$driver			= $this->load_rdriver();
 		$RES			= new $driver();
-		$RES->conn_id		= $this->conn_id;
-		$RES->result_id		= $this->result_id;
+		$RES->conn_id	= $this->conn_id;
+		$RES->result_id	= $this->result_id;
 
-		if ($this->dbdriver == 'oci8')
+		if ($this->dbdriver === 'oci8')
 		{
 			$RES->stmt_id		= $this->stmt_id;
 			$RES->curs_id		= $this->curs_id;
@@ -419,7 +427,7 @@
 
 		// Is query caching enabled?  If so, we'll serialize the
 		// result object and save it to a cache file.
-		if ($this->cache_on == TRUE && $this->_cache_init())
+		if ($this->cache_on == TRUE AND $this->_cache_init())
 		{
 			// We'll create a new instance of the result object
 			// only without the platform specific driver since
@@ -447,9 +455,10 @@
 	/**
 	 * Load the result drivers
 	 *
+	 * @access	public
 	 * @return	string	the name of the result class
 	 */
-	public function load_rdriver()
+	function load_rdriver()
 	{
 		$driver = 'CI_DB_'.$this->dbdriver.'_result';
 
@@ -470,10 +479,11 @@
 	 * we only use it when running transaction commands since they do
 	 * not require all the features of the main query() function.
 	 *
+	 * @access	public
 	 * @param	string	the sql query
 	 * @return	mixed
 	 */
-	public function simple_query($sql)
+	function simple_query($sql)
 	{
 		if ( ! $this->conn_id)
 		{
@@ -489,9 +499,10 @@
 	 * Disable Transactions
 	 * This permits transactions to be disabled at run-time.
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function trans_off()
+	function trans_off()
 	{
 		$this->trans_enabled = FALSE;
 	}
@@ -500,15 +511,15 @@
 
 	/**
 	 * Enable/disable Transaction Strict Mode
-	 *
 	 * When strict mode is enabled, if you are running multiple groups of
 	 * transactions, if one group fails all groups will be rolled back.
 	 * If strict mode is disabled, each group is treated autonomously, meaning
 	 * a failure of one group will not affect any others
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function trans_strict($mode = TRUE)
+	function trans_strict($mode = TRUE)
 	{
 		$this->trans_strict = is_bool($mode) ? $mode : TRUE;
 	}
@@ -518,9 +529,10 @@
 	/**
 	 * Start Transaction
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function trans_start($test_mode = FALSE)
+	function trans_start($test_mode = FALSE)
 	{
 		if ( ! $this->trans_enabled)
 		{
@@ -543,9 +555,10 @@
 	/**
 	 * Complete Transaction
 	 *
+	 * @access	public
 	 * @return	bool
 	 */
-	public function trans_complete()
+	function trans_complete()
 	{
 		if ( ! $this->trans_enabled)
 		{
@@ -589,9 +602,10 @@
 	/**
 	 * Lets you retrieve the transaction flag to determine if it has failed
 	 *
+	 * @access	public
 	 * @return	bool
 	 */
-	public function trans_status()
+	function trans_status()
 	{
 		return $this->_trans_status;
 	}
@@ -601,11 +615,12 @@
 	/**
 	 * Compile Bindings
 	 *
+	 * @access	public
 	 * @param	string	the sql statement
 	 * @param	array	an array of bind data
 	 * @return	string
 	 */
-	public function compile_binds($sql, $binds)
+	function compile_binds($sql, $binds)
 	{
 		if (strpos($sql, $this->bind_marker) === FALSE)
 		{
@@ -643,12 +658,17 @@
 	/**
 	 * Determines if a query is a "write" type.
 	 *
+	 * @access	public
 	 * @param	string	An SQL query string
-	 * @return	bool
+	 * @return	boolean
 	 */
-	public function is_write_type($sql)
+	function is_write_type($sql)
 	{
-		return (bool) preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql);
+		if ( ! preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql))
+		{
+			return FALSE;
+		}
+		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
@@ -656,10 +676,11 @@
 	/**
 	 * Calculate the aggregate query elapsed time
 	 *
-	 * @param	int	The number of decimal places
-	 * @return	string
+	 * @access	public
+	 * @param	integer	The number of decimal places
+	 * @return	integer
 	 */
-	public function elapsed_time($decimals = 6)
+	function elapsed_time($decimals = 6)
 	{
 		return number_format($this->benchmark, $decimals);
 	}
@@ -669,9 +690,10 @@
 	/**
 	 * Returns the total number of queries
 	 *
+	 * @access	public
 	 * @return	integer
 	 */
-	public function total_queries()
+	function total_queries()
 	{
 		return $this->query_count;
 	}
@@ -681,9 +703,10 @@
 	/**
 	 * Returns the last query that was executed
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function last_query()
+	function last_query()
 	{
 		return end($this->queries);
 	}
@@ -696,10 +719,11 @@
 	 * Escapes data based on type
 	 * Sets boolean and null types
 	 *
+	 * @access	public
 	 * @param	string
 	 * @return	mixed
 	 */
-	public function escape($str)
+	function escape($str)
 	{
 		if (is_string($str))
 		{
@@ -725,10 +749,11 @@
 	 * Calls the individual driver for platform
 	 * specific escaping for LIKE conditions
 	 *
+	 * @access	public
 	 * @param	string
 	 * @return	mixed
 	 */
-	public function escape_like_str($str)
+	function escape_like_str($str)
 	{
 		return $this->escape_str($str, TRUE);
 	}
@@ -738,13 +763,14 @@
 	/**
 	 * Primary
 	 *
-	 * Retrieves the primary key. It assumes that the row in the first
+	 * Retrieves the primary key.  It assumes that the row in the first
 	 * position is the primary key
 	 *
+	 * @access	public
 	 * @param	string	the table name
 	 * @return	string
 	 */
-	public function primary($table = '')
+	function primary($table = '')
 	{
 		$fields = $this->list_fields($table);
 
@@ -761,9 +787,10 @@
 	/**
 	 * Returns an array of table names
 	 *
+	 * @access	public
 	 * @return	array
 	 */
-	public function list_tables($constrain_by_prefix = FALSE)
+	function list_tables($constrain_by_prefix = FALSE)
 	{
 		// Is there a cached result?
 		if (isset($this->data_cache['table_names']))
@@ -806,23 +833,24 @@
 
 	/**
 	 * Determine if a particular table exists
-	 *
+	 * @access	public
 	 * @return	boolean
 	 */
-	public function table_exists($table_name)
+	function table_exists($table_name)
 	{
-		return in_array($this->_protect_identifiers($table_name, TRUE, FALSE, FALSE), $this->list_tables());
+		return ( ! in_array($this->_protect_identifiers($table_name, TRUE, FALSE, FALSE), $this->list_tables())) ? FALSE : TRUE;
 	}
 
 	// --------------------------------------------------------------------
 
 	/**
-	 * Fetch Field Names
+	 * Fetch MySQL Field Names
 	 *
+	 * @access	public
 	 * @param	string	the table name
 	 * @return	array
 	 */
-	public function list_fields($table = '')
+	function list_fields($table = '')
 	{
 		// Is there a cached result?
 		if (isset($this->data_cache['field_names'][$table]))
@@ -871,14 +899,14 @@
 
 	/**
 	 * Determine if a particular field exists
-	 *
+	 * @access	public
 	 * @param	string
 	 * @param	string
 	 * @return	boolean
 	 */
-	public function field_exists($field_name, $table_name)
+	function field_exists($field_name, $table_name)
 	{
-		return in_array($field_name, $this->list_fields($table_name));
+		return ( ! in_array($field_name, $this->list_fields($table_name))) ? FALSE : TRUE;
 	}
 
 	// --------------------------------------------------------------------
@@ -886,10 +914,11 @@
 	/**
 	 * Returns an object with field data
 	 *
+	 * @access	public
 	 * @param	string	the table name
 	 * @return	object
 	 */
-	public function field_data($table = '')
+	function field_data($table = '')
 	{
 		if ($table == '')
 		{
@@ -901,6 +930,7 @@
 		}
 
 		$query = $this->query($this->_field_data($this->_protect_identifiers($table, TRUE, NULL, FALSE)));
+
 		return $query->field_data();
 	}
 
@@ -909,11 +939,12 @@
 	/**
 	 * Generate an insert string
 	 *
+	 * @access	public
 	 * @param	string	the table upon which the query will be performed
 	 * @param	array	an associative array data of key/values
 	 * @return	string
 	 */
-	public function insert_string($table, $data)
+	function insert_string($table, $data)
 	{
 		$fields = array();
 		$values = array();
@@ -932,16 +963,17 @@
 	/**
 	 * Generate an update string
 	 *
+	 * @access	public
 	 * @param	string	the table upon which the query will be performed
 	 * @param	array	an associative array data of key/values
 	 * @param	mixed	the "where" statement
 	 * @return	string
 	 */
-	public function update_string($table, $data, $where)
+	function update_string($table, $data, $where)
 	{
 		if ($where == '')
 		{
-			return FALSE;
+			return false;
 		}
 
 		$fields = array();
@@ -984,12 +1016,19 @@
 	/**
 	 * Tests whether the string has an SQL operator
 	 *
+	 * @access	private
 	 * @param	string
 	 * @return	bool
 	 */
-	protected function _has_operator($str)
+	function _has_operator($str)
 	{
-		return (bool) preg_match('/(\s|<|>|!|=|is null|is not null)/i', trim($str));
+		$str = trim($str);
+		if ( ! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str))
+		{
+			return FALSE;
+		}
+
+		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
@@ -997,11 +1036,12 @@
 	/**
 	 * Enables a native PHP function to be run, using a platform agnostic wrapper.
 	 *
+	 * @access	public
 	 * @param	string	the function name
 	 * @param	mixed	any parameters needed by the function
 	 * @return	mixed
 	 */
-	public function call_function($function)
+	function call_function($function)
 	{
 		$driver = ($this->dbdriver == 'postgre') ? 'pg_' : $this->dbdriver.'_';
 
@@ -1038,10 +1078,11 @@
 	/**
 	 * Set Cache Directory Path
 	 *
+	 * @access	public
 	 * @param	string	the path to the cache directory
 	 * @return	void
 	 */
-	public function cache_set_path($path = '')
+	function cache_set_path($path = '')
 	{
 		$this->cachedir = $path;
 	}
@@ -1051,11 +1092,13 @@
 	/**
 	 * Enable Query Caching
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function cache_on()
+	function cache_on()
 	{
-		return $this->cache_on = TRUE;
+		$this->cache_on = TRUE;
+		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
@@ -1063,11 +1106,13 @@
 	/**
 	 * Disable Query Caching
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function cache_off()
+	function cache_off()
 	{
-		return $this->cache_on = FALSE;
+		$this->cache_on = FALSE;
+		return FALSE;
 	}
 
 
@@ -1076,9 +1121,10 @@
 	/**
 	 * Delete the cache files associated with a particular URI
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function cache_delete($segment_one = '', $segment_two = '')
+	function cache_delete($segment_one = '', $segment_two = '')
 	{
 		if ( ! $this->_cache_init())
 		{
@@ -1092,9 +1138,10 @@
 	/**
 	 * Delete All cache files
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function cache_delete_all()
+	function cache_delete_all()
 	{
 		if ( ! $this->_cache_init())
 		{
@@ -1109,18 +1156,22 @@
 	/**
 	 * Initialize the Cache Class
 	 *
+	 * @access	private
 	 * @return	void
 	 */
-	private function _cache_init()
+	function _cache_init()
 	{
-		if (is_object($this->CACHE) && class_exists('CI_DB_Cache'))
+		if (is_object($this->CACHE) AND class_exists('CI_DB_Cache'))
 		{
 			return TRUE;
 		}
 
-		if ( ! class_exists('CI_DB_Cache') && ! @include(BASEPATH.'database/DB_cache.php'))
+		if ( ! class_exists('CI_DB_Cache'))
 		{
-			return $this->cache_off();
+			if ( ! @include(BASEPATH.'database/DB_cache.php'))
+			{
+				return $this->cache_off();
+			}
 		}
 
 		$this->CACHE = new CI_DB_Cache($this); // pass db object to support multiple db connections and returned db objects
@@ -1132,9 +1183,10 @@
 	/**
 	 * Close DB Connection
 	 *
+	 * @access	public
 	 * @return	void
 	 */
-	public function close()
+	function close()
 	{
 		if (is_resource($this->conn_id) OR is_object($this->conn_id))
 		{
@@ -1148,12 +1200,13 @@
 	/**
 	 * Display an error message
 	 *
+	 * @access	public
 	 * @param	string	the error message
 	 * @param	string	any "swap" values
 	 * @param	boolean	whether to localize the message
 	 * @return	string	sends the application/error_db.php template
 	 */
-	public function display_error($error = '', $swap = '', $native = FALSE)
+	function display_error($error = '', $swap = '', $native = FALSE)
 	{
 		$LANG =& load_class('Lang', 'core');
 		$LANG->load('db');
@@ -1199,10 +1252,11 @@
 	 *
 	 * This function adds backticks if appropriate based on db type
 	 *
+	 * @access	private
 	 * @param	mixed	the item to escape
 	 * @return	mixed	the item with backticks
 	 */
-	public function protect_identifiers($item, $prefix_single = FALSE)
+	function protect_identifiers($item, $prefix_single = FALSE)
 	{
 		return $this->_protect_identifiers($item, $prefix_single);
 	}
@@ -1216,7 +1270,7 @@
 	 * a couple functions in this class.
 	 * It takes a column or table name (optionally with an alias) and inserts
 	 * the table prefix onto it.  Some logic is necessary in order to deal with
-	 * column names that include the path. Consider a query like this:
+	 * column names that include the path.  Consider a query like this:
 	 *
 	 * SELECT * FROM hostname.database.table.column AS c FROM hostname.database.table
 	 *
@@ -1229,14 +1283,14 @@
 	 * insert the table prefix (if it exists) in the proper position, and escape only
 	 * the correct identifiers.
 	 *
-	 * @access	public (DB Forge needs it to be public!)
+	 * @access	private
 	 * @param	string
 	 * @param	bool
 	 * @param	mixed
 	 * @param	bool
 	 * @return	string
 	 */
-	public function _protect_identifiers($item, $prefix_single = FALSE, $protect_identifiers = NULL, $field_exists = TRUE)
+	function _protect_identifiers($item, $prefix_single = FALSE, $protect_identifiers = NULL, $field_exists = TRUE)
 	{
 		if ( ! is_bool($protect_identifiers))
 		{
@@ -1284,7 +1338,7 @@
 			$parts	= explode('.', $item);
 
 			// Does the first segment of the exploded item match
-			// one of the aliases previously identified? If so,
+			// one of the aliases previously identified?  If so,
 			// we have nothing more to do other than escape the item
 			if (in_array($parts[0], $this->ar_aliased_tables))
 			{
@@ -1303,7 +1357,7 @@
 				return $item.$alias;
 			}
 
-			// Is there a table prefix defined in the config file? If not, no need to do anything
+			// Is there a table prefix defined in the config file?  If not, no need to do anything
 			if ($this->dbprefix != '')
 			{
 				// We now add the table prefix based on some logic.
@@ -1336,7 +1390,7 @@
 				// Verify table prefix and replace if necessary
 				if ($this->swap_pre != '' && strncmp($parts[$i], $this->swap_pre, strlen($this->swap_pre)) === 0)
 				{
-					$parts[$i] = preg_replace('/^'.$this->swap_pre.'(\S+?)/', $this->dbprefix.'\\1', $parts[$i]);
+					$parts[$i] = preg_replace("/^".$this->swap_pre."(\S+?)/", $this->dbprefix."\\1", $parts[$i]);
 				}
 
 				// We only add the table prefix if it does not already exist
@@ -1357,23 +1411,23 @@
 			return $item.$alias;
 		}
 
-		// Is there a table prefix? If not, no need to insert it
+		// Is there a table prefix?  If not, no need to insert it
 		if ($this->dbprefix != '')
 		{
 			// Verify table prefix and replace if necessary
 			if ($this->swap_pre != '' && strncmp($item, $this->swap_pre, strlen($this->swap_pre)) === 0)
 			{
-				$item = preg_replace('/^'.$this->swap_pre.'(\S+?)/', $this->dbprefix.'\\1', $item);
+				$item = preg_replace("/^".$this->swap_pre."(\S+?)/", $this->dbprefix."\\1", $item);
 			}
 
 			// Do we prefix an item with no segments?
-			if ($prefix_single == TRUE && substr($item, 0, strlen($this->dbprefix)) != $this->dbprefix)
+			if ($prefix_single == TRUE AND substr($item, 0, strlen($this->dbprefix)) != $this->dbprefix)
 			{
 				$item = $this->dbprefix.$item;
 			}
 		}
 
-		if ($protect_identifiers === TRUE && ! in_array($item, $this->_reserved_identifiers))
+		if ($protect_identifiers === TRUE AND ! in_array($item, $this->_reserved_identifiers))
 		{
 			$item = $this->_escape_identifiers($item);
 		}
@@ -1384,5 +1438,6 @@
 
 }
 
+
 /* End of file DB_driver.php */
 /* Location: ./system/database/DB_driver.php */
